add recoverymode and CRC checking to FIT reader. (#549)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Fri, 1 May 2020 12:32:18 +0000 (06:32 -0600)
committerGitHub <noreply@github.com>
Fri, 1 May 2020 12:32:18 +0000 (06:32 -0600)
commit0b680daf28fffa1ad84cdb93ff2acf02ff58a972
tree411aed5313cac643e30a8ab283a0cc6746f1ce3e
parent97bb602b392ccda18992509c7507007f0ba7bd39
add recoverymode and CRC checking to FIT reader. (#549)

* add recoverymode and CRC checking to FIT reader.

If present, the header CRC is checked.
The file CRC and length is checked.

A recoverymode option is added.
In the default mode we will fatal with:
a bad CRC,
a bad endian field,
an attempt to read when the data section doesn't have sufficient data,
an unexepected EOF.
In recovery mode when we encounter one of these errors we will abort
read processing and continue.  This allows a more immediate cleaner
exit from the reader while still allowing any writer to use data that
was recovered previous to the read abort.

* add further explanation of recoverymode for document.

* make sure garmin fit messages are defined before being used.
garmin_fit.cc
garmin_fit.h
reference/format3.txt
reference/help.txt
testo.d/garmin_fit.test
xmldoc/formats/options/garmin_fit-recoverymode.xml [new file with mode: 0644]